{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Load the data from dataset.mat and split it evenly into a training set\n",
    "and a test set. Each sample consists of a point in 2D and a class label\n",
    "{1,2,3}. For each point in the test set, predict its label by a k-nearest\n",
    "neighbor classifier “trained” using the training set. Compute the average\n",
    "classification error using the true labels of the test set. Visualize the\n",
    "training points and the classified points and mark misclassifications. Do\n",
    "the same for different k."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Do the same as above for different splits of the set into training and\n",
    "test set. Is the classification error always the same? Compute the mean\n",
    "and the variance of the classification error over multiple splits. How are the\n",
    "mean and the variance affected by k? What you should observe is called\n",
    "the bias-variance tradeoff and will be discussed in the next class."
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
